import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: qian
 * Date: 2022-11-02
 * Time: 18:46
 */
public class Prac1031 {
    public static void main(String[] args) {
        int[] arr1={1,2,3,0,0,0};
        int[] arr2={4,5,6};
        arr1=Arrays.copyOf(arr1,5+3);
        for(int i=0;i<arr1.length;i++){
            System.out.println(arr1[i]);
        }
    }
    public static void main1(String[] args) {
        //编写代码模拟三次密码输入的场景。 最多能输入三次密码，密码正确，提示“登录成功”
        // 密码错误， 可以重新输 入，最多输入三次。三次均错，则提示退出程序
        int count = 3 ;
        Scanner scanner = new Scanner(System.in);
        while (count != 0) {
            String passWorld = scanner.nextLine();
            if (passWorld.equals("123456")) {
                System.out.println("登录成功！");
                break;
            } else {
                count--;
            }
        }
        if (count == 0) {
            System.out.println("登录失败！");
        }
    }
}